const jwt = require('jsonwebtoken')

const security = {
  secretkey: 'popop',
  expiresIn: 60 * 60 * 24 * 7
}

function getToken(userId) {
  return jwt.sign({userId}, security.secretkey, {expiresIn: security.expiresIn})
}

function getSecretKey() {
  return security.secretkey
}

module.exports = {getToken, getSecretKey}